﻿@model BskLeague.Models.Team

@{
    ViewBag.Title = "TeamDetails";
}

@Html.Partial("_Submenu")

<h3>Detale drużyny</h3>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("TeamDetails", "MyTeam", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
     @Html.HiddenFor(model => model.TeamId)

        <div class="editor-label">
            @Html.LabelFor(model => model.TeamName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TeamName)
            @Html.ValidationMessageFor(model => model.TeamName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TshirtColorPrimary)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TshirtColorPrimary)
            @Html.ValidationMessageFor(model => model.TshirtColorPrimary)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TshirtColorSecondary)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TshirtColorSecondary)
            @Html.ValidationMessageFor(model => model.TshirtColorSecondary)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Description, 5, 40, null)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        string url = Url.Content("~/uploads/" + Model.LogoFileName);

        if (Model.LogoFileName != null)
        {
            <div><img height="200" width="200" src= "@url" alt="IMAGES" /></div>
        }
    
        <input type="file" name="file" /> <br />
        <input type="submit" value="Zapisz" />
}


